Skip to content

Fix file name information for .included code.#161

Open
athas wants to merge 1 commit intoTheThirdOne:masterfrom
diku-dk:issue160
Open

Fix file name information for .included code.#161
athas wants to merge 1 commit intoTheThirdOne:masterfrom
diku-dk:issue160

Conversation

@athas
Copy link

@athas athas commented Sep 23, 2022

This means that ProgramStatements now refer to the file they actually occur in, like is the case for the original SourceLine. This is used for various diagnostics messages.

Fixes #160.

@athas
Copy link
Author

athas commented Sep 23, 2022

Hm, this seems to break the assembler for some other programs somehow.

@athas athas marked this pull request as draft September 23, 2022 13:58
The sourceProgram is not correct for statements that come from an
.include, and the assembler depends on the sourceProgram actually
being the "top-level" program, not the actual file.

Fixes TheThirdOne#160.
@athas athas marked this pull request as ready for review September 23, 2022 14:06
@athas
Copy link
Author

athas commented Sep 23, 2022

Man is the assembler logic tangled. I made it work by having a specific field (only used for diagnostics) that contains the file name of the statement.

@athas athas changed the title Use original program when constructing ProgramStatement. Fix file name information for .included code. Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect file name in errors when using .import

1 participant